<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page import="com.book.Dao.*"%>
<%@page import="java.sql.ResultSet"%>
<% 
      ResultSet rs=null;
      String fenlei=null;
      String fenlei1=null;
      String fenlei2=null;
SelectAllBook allbook=new SelectAllBook();
      rs=allbook.findbook();
      while(rs.next()){
    	  int x=rs.getInt("FENLEIID");
    	  if(x==1){
    		  fenlei="1";
    	  }else if(x==2){
    		  fenlei1="2";
    	  }else if(x==3){
    		  fenlei2="3";
    	  }
      }
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>My JSP 'BookManager.jsp' starting page</title>

	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
   <style>
   body{
      	margin: 0px;
	    padding: 0px;
	    background-color: #45a5cf;
	    text-align: center;
   }
   .String{
   margin-top:10px;
   }
   .img{
   width:1100px;
   }
   .a{
   margin-top:100px;
   }
   .a img{
   border:none;
   margin-left:20px;
   }
   </style>
  </head>

  <body>
  <img class="img" src="../shangmian1.png">
  <div class="a">
      <a href="list.jsp?fenlei=<%=fenlei%>"><img src="../book_img/shu1.jpg"></a>
      <a href="list.jsp?fenlei=<%=fenlei2%>"><img src="../book_img/shu3.jpg"></a>
      <a href="list.jsp?fenlei=<%=fenlei1%>"><img src="../book_img/shu2.png"></a>
      <a href="add.jsp"><img src="../book_img/shu4.jpg"></a>
  </div>
  </body>
</html>
